<template>
    <div class="theme-default">
        <div class="login-page">
            <div class="login-header">
            </div>
            <div class="login-panel">
                <div class="inner flex">
                    <div class="flex-item login-form">
                        <div class="login-text">
                            河木科技
                            <!-- <div class="tabs">
                                <div class="tab-item" @click="checkTab('1')" :class="{ 'tab-item-active': tabCurIndex == 1 }">
                                    密码登录
                                </div>
                                <div class="tab-split"></div>
                                <div class="tab-item" @click="checkTab('2')" :class="{ 'tab-item-active': tabCurIndex == 2 }">
                                    免密登录
                                </div>
                                <div class="tab-split"></div>
                                <div class="tab-item" @click="checkTab('3')" :class="{ 'tab-item-active': tabCurIndex == 3 }">
                                    扫码登录
                                </div>
                            </div> -->
                        </div>
                        <div class="form">
                            <PasswordLogin :lineHeight="lineHeight"></PasswordLogin>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</template>

<script setup>
import {
    ref
} from "vue";
const config = {
    lineHeight: '30px',
    bgColor: '#ddd'
}

import PasswordLogin from "./components/PasswordLogin/index.vue";

const lineHeight = ref(config.lineHeight); //输入行高
const bgColor = ref(config.bgColor); //背景色


const tabCurIndex = ref(1);
const checkTab = (index) => {
    tabCurIndex.value = index;
}

</script>

<style scoped lang="scss">

.theme-default .login-page {
    background: v-bind(bgColor);
    position: fixed;
    left: 0px;
    top: 0px;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100%;
    background-image: url('src/assets/image/login-background.jpg');
    background-size: cover
}

.theme-default .login-page .login-panel {
    justify-content: center;
    justify-items: center;
    vertical-align: middle;
    align-items: center;
    display: flex;
    height: 100vh;
}

.theme-default .login-page .login-panel .inner {
    // height: 450px;
    margin: 0 auto;
    background-color: #fff;
    border-radius: 10px;
    box-shadow: 0 0 30px #00000055;
}

.theme-default .login-page .logo-panel {
    border-bottom-left-radius: 10px;
    border-top-left-radius: 10px;
    padding-top: 80px;
    width: 45%;
}

.theme-default .login-page .logo-panel .title {
    line-height: 120px;
    font-size: 30px;
    letter-spacing: 5px;
    text-align: center;
    background-image: -webkit-linear-gradient(right, red, #ff5722, #ff9800);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.theme-default .login-page .logo-panel .logo {
    text-align: center;
}

.theme-default .login-page .logo-panel .logo :deep(.el-image__inner) {
    width: 130px;
    height: 130px;
}

.theme-default .login-page .v-split {
    width: 1px;
    height: 450px;
    background: linear-gradient(45deg, #f4433600, #f44336, #f4433600);
}

.theme-default .login-page .login-form {
    margin-left: 10px;
    padding: 0 20px;
    width: 100%;
    .login-text {
        font-size: 28px;
        font-weight: 500;
        text-align: center;
        margin-top: 45px;
    }
}

.theme-default .login-page .login-panel .tabs {
    margin-top: 20px;
    font-size: 16px;
    letter-spacing: 5px;
    display: flex;
    text-align: center;
    height: v-bind(lineHeight);
    line-height: v-bind(lineHeight);
}

.theme-default .login-page .login-panel .tabs .tab-item {
    flex: 1;
    height: v-bind(lineHeight);
    line-height: v-bind(lineHeight);
    cursor: pointer;
    user-select: none;
}

.theme-default .login-page .login-panel .tabs .tab-item:hover {
    color: #ff5722;
}

.theme-default .login-page .login-panel .tabs .tab-split {
    width: 1px;
    height: v-bind(lineHeight);
    line-height: v-bind(lineHeight);
}

.theme-default .login-page .login-panel .tabs .tab-item-active {
    color: #ff5722;
}

.theme-default .login-page .login-panel .tabs .tab-item:first-child {
    border-bottom-left-radius: 5px;
    border-top-left-radius: 5px;
}

.theme-default .login-page .login-panel .tabs .tab-item:last-child {
    border-bottom-right-radius: 5px;
    border-top-right-radius: 5px;
}


.theme-default .login-page .login-panel .form {
    padding: 0 20px;
    margin-top: 10px;
    margin-bottom: 30px;
    overflow: hidden;
}

.theme-default .login-page .login-footer {
    position: fixed;
    left: 0;
    bottom: 0;
    width: 100%;
    height: 4vh;
    font-size: 14px;
    text-align: center;
    color: #fff
}
</style>